package com.txsj.scan.utils;

/**
 * Created by wangchuangjun on 2019/02/25.
 */
/**
 * 处理点击出现多次跳转
 */
public class ClickUtils {

    // 两次点击按钮之间的点击间隔不能少于1000毫秒
    private static long lastClickTime;
    public static boolean isFastClick( long timer) {
        boolean flag = false;
        long curClickTime = System.currentTimeMillis();
        if ((curClickTime - lastClickTime) >= timer) {
            flag = true;
        }
        lastClickTime = curClickTime;
        return flag;
    }
}
